/*
 * @Description:
 * @Author: Rfan
 * @Date: 2021-11-05 22:06:13
 * @LastEditTime: 2022-03-26 14:48:49
 */

import { useIntl } from 'react-intl';

export function useFormatMessage(str) {
  const intl = useIntl();
  return (id, values) => intl.formatMessage({ id }, values);
}
